package com.ygou.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ygou.mapper.GoodsAppraisesMapper;
import com.ygou.pojo.GoodsAppraises;
import com.ygou.pojo.GoodsAppraisesExample;
import com.ygou.pojo.GoodsAppraisesExample.Criteria;
import com.ygou.service.GoodsAppraisesService;

@Service
public class GoodsAppraisesServiceImpl implements GoodsAppraisesService {
	@Autowired
	private GoodsAppraisesMapper goodsAppraisesMapper;
	@Override
	public GoodsAppraises insert(GoodsAppraises record) {
		record.setCreatetime(new java.util.Date());
		int appid=goodsAppraisesMapper.insert(record);
		GoodsAppraises app=goodsAppraisesMapper.selectByPrimaryKey(appid);
		return app;
	}

	@Override
	public List<GoodsAppraises> selectByExampleWithBLOBs(Integer goodsid) {
		GoodsAppraisesExample example=new GoodsAppraisesExample();
		Criteria c= example.createCriteria();
		c.andGoodsidEqualTo(goodsid);
		return goodsAppraisesMapper.selectByExampleWithBLOBs(example);
	}

}
